<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    String date= format.format(new Date());
%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListExamOderPage.jsp"%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentExamImport.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css" >
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
</head>
<style>
select{width: 234px;height: 31px}
.gn_name{padding-top: 5px}
.div_zilei{width: 600px;padding-left: 90px;height: 30px}
.tr{height:40px;background:#57a0ff;}
.tr td{font-size: 14px;color: #ffffff;font-weight: 700}
.tr_td td{border-bottom: 1px solid #ededed;text-align: center;}
tr td:nth-child(1) {font-size: 14px;color: #cccccc}
.date{border: 0;background: #ffffff;text-align: center;}
.tr_td td:nth-child(1){border-left: 1px solid #cccccc;}
.deleteTable:HOVER{cursor:pointer;color: #056dae;}
.addTable:HOVER{cursor:pointer;color: #056dae;}
input{height: 31px;width: 200px}
.div_input_hang{width: 97%}	
.input_hang{width: 30%;height: 60px}
.input_hang input{width: 200px}
.gn_name{width: 100px}
.order{
margin-right: 20px;font-size: 16px;cursor: pointer;
}
.order.ACTIVE {
	margin-right: 20px;color: #a9bbe0;font-size: 16px;border-bottom: 3px solid #427dff;
	cursor: pointer;
}
</style>
<body style="background: #f5f5f5">
<div class="main">
	<div class="weizhi">
		预约管理>>考试预约(批量)>>详情
	</div>
	
	<div class="div_body" style="min-height: 900px">	
	
	
		<div class="div_form">
			<div class="div_input_hang">
				<div>
					 <input style="width: 90px;height: 30px;margin-top: 0px" id="exportExcle"  class="input_submit" value="导出EXCLE" type="submit">
				</div>
             	<div>
             		<input style="width: 90px;height: 30px;margin-top: 0px" id="uploadEventBtn"  class="input_submit" value="导入EXCLE" type="submit">
             	</div>
             	<form id="batchUpload"   method="post" class="form-horizontal" enctype="multipart/form-data" >    
							    	<%--<!-- <button class="btn btn-success btn-xs" id="uploadEventBtn" style="height:26px;"  type="button" >选择文件</button> -->--%>
							    	<input type="file" name="file"  style="width:0px;height:0px;" id="uploadEventFile">  
							    	<input type="hidden" id="uploadEventPath"  disabled="disabled"  placeholder="请选择excel表" style="border: 1px solid #e6e6e6; height: 26px;width: 200px;" >                                           
				</form>
			</div>	
			
			
			<!--新增  -->
			<form action="<%=path%>/DrivingSys/saveExamOrderMass" method="post" class="form">
			<div class="div_input_hang">
				<div class="input_hang">
                    <span class="gn_name">预约考试时间&nbsp;:&nbsp;</span>
                    <input name="cfexamdate" id="date" readonly="readonly" value="${examOrder.cfexamdate}" style="color: gray;"  />
                </div>
                <div class="input_hang">
                    <span class="gn_name">预约类型&nbsp;:&nbsp;</span>
                       		<select  disabled="disabled" style="width:200px;height: 32px" class="cfbilltype" >
							 	<c:if test="${examOrder.cfbilltype eq 2}">
								 	<option value="2" selected="selected"  style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfbilltype eq 3}">
								 	<option value="2" style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" selected="selected" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfbilltype eq 4}">
								 	<option value="2" style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" selected="selected" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
							</select>
							<input type="hidden" name="cfbilltype"  value="${examOrder.cfbilltype}">
                </div>
                <div class="input_hang">
                    <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select  disabled="disabled" class="carType" style="width: 200px" >
                          <c:if test="${examOrder.cfsqzjcxdh == 'A1'}">
									<option selected="selected" value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'A2' }">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option selected="selected" value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px" ></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'A3'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option  selected="selected"  value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px" ></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'B1'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option selected="selected" value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'B2'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option selected="selected" value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C1'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option selected="selected" value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C2'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option selected="selected" value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C3'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option selected="selected" value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C4'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option selected="selected" value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'D'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option selected="selected" value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'E'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option selected="selected" value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'F'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option selected="selected"  value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh =='M'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option selected="selected" value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'N'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option selected="selected" value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'P'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option selected="selected" value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh  == '' || examOrder.cfsqzjcxdh == null }">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option selected="selected"  value=" " style="font-size: 16px"></option>
								 	</c:if>
                        </select>
                        <input type="hidden" name="cfsqzjcxdh"  value="${examOrder.cfsqzjcxdh}">
                </div>

			</div>
			<div class="div_input_hang">
				<div class="input_hang">
                    <span class="gn_name">预约成功人数&nbsp;:&nbsp;</span>
                    <input class="yyCount"  disabled="disabled"  type="text" value="${success}" style="color: gray;" />
                </div>
                <div class="input_hang">
                    <span class="gn_name">其中初考人数&nbsp;:&nbsp;</span>
                    <input class="ckCount" disabled="disabled" value="${firstExam}"  type="text"  style="color: gray;" />
                </div>
                <div class="input_hang">
                    <span class="gn_name">补考人数&nbsp;:&nbsp;</span>
                    <input class="bkCount"  disabled="disabled" value="${notFirstExam}"  type="text"  style="color: gray;" />
            	 </div>
			</div>


						<div class="div_zilei" style="width: 78%;float: left;padding-left: 20px">
							<div style="width: 200px;text-align: left;float: left;color: #444444;font-size: 16px;">
								<span  class="order active" >预约成功</span>
								<span  class="order">预约失败</span>
							</div>
							<div style="text-align: right;float: right;line-height: 30px">
								<img src="<%=path%>/image/insert2323.jpg" class="addTable">
								<span style="padding-right: 30px;color:#57a0ff;font-weight:700;font-size: 14px" class="addTable">添加预约成功学员</span>
								<img src="<%=path%>/image/insert2323.jpg" class="addTable">
								<span style="padding-right: 10px;color:#57a0ff;font-weight:700;font-size: 14px;cursor: pointer;" class="failTable">添加预约失败学员</span>
								<img src="<%=path%>/image/delete212.png" class="addTable">
								<span style="padding-right: 10px;color:#57a0ff;font-weight:700;font-size: 14px;cursor: pointer;" class="deleteTable">删除学员</span>
								<input class="flag" type="hidden" value="1">
								<input class="flags" name="flags" type="hidden" >
							</div>

						</div>
				<div  class="success">
						<div style="overflow:auto;height: 240px;width: 79%;padding-left: 20px;padding-top: 20px;">
								<table  width="100%" align="center" class="tableTr" style="min-height:30px;overflow:hidden;border-spacing:0;">
									<tr  class="tr">
										<td  width="20px"></td>
										<td  width="20px"></td>
										<td width="200px" align="center">学员</td>
										<td width="200px" align="center">学员编码</td>
										<td width="200px" align="center">性别</td>
										<td width="200px" align="center">班级</td>
										<td width="200px" align="center">车型</td>
										<td width="200px" align="center">身份证号码</td>
										<td width="200px" align="center">手机</td>
										<td width="200px" align="center">应收金额</td>
										<td width="200px" align="center">已收金额</td>
										<td width="200px" align="center">优惠金额</td>
										<td width="200px" align="center">欠费金额</td>
										<td width="200px" align="center">初考/补考</td>
										<td width="200px" align="center">推荐人</td>
										<td width="200px" align="center">备注</td>
									</tr>
									<c:forEach items="${examOrders}"  var="examOrder1" varStatus="index">
										<input type='hidden' name="fids" class="fid" value="${examOrder1.fid}" >
										<tr class="tr_td">
										<td>
											<input type="checkbox"  name="students">

										</td>
											<td>
												<p style="color: black;">${index.index+1}</p>
											</td>
										<td>
											<input type="text" readonly="readonly"  name="cfstudentname" value="${examOrder1.cfstudentname}" >
											<input type='hidden' name="cfstudentid"  value="${examOrder1.cfstudentid}" >
										</td>
										<td>
											<input type="text" name="cfstudentno"  readonly="readonly"  value="${examOrder1.cfstudentno}" >
										</td>
										<td>
											<c:if test="${examOrder1.cfsex eq 1}">
											<input type="text" readonly="readonly"  value="男" >
											</c:if>
											<c:if test="${examOrder1.cfsex eq 2}">
												<input type="text" readonly="readonly"  value="女" >
											</c:if>
											<c:if test="${examOrder1.cfsex eq null}">
												<input type="text" readonly="readonly" value="" >
											</c:if>
											<input type='hidden' name="cfsex1"   value="${examOrder1.cfsex}" >
										</td>
										<td>
											<input type="text" name="cfclazzName" readonly="readonly"  value="${examOrder1.cfclazzName}" >
											<input type='hidden' name='cfclazzid' value="${examOrder1.cfclazzid}" >
										</td>
											<td>
												<input type="text" readonly="readonly"  value="${examOrder1.cfsqzjcxdh}" >
												<input type='hidden' name='cfcarbyte' value="${examOrder1.cfcarbyte}" >
											</td>
											<td>
												<input type="text" name="cfidcardno" readonly="readonly"  value="${examOrder1.cfidcardno}" >
											</td>
											<td>
												<input type="text" name="cfmobile" readonly="readonly"  value="${examOrder1.cfmobile}" >
											</td>
											<td>
												<input type="text" name="cfamount" readonly="readonly"  value="${examOrder1.cfamount}" >
											</td>
											<td>
												<input type="text" name="cfreceived" readonly="readonly"  value="${examOrder1.cfreceived}" >
											</td>
											<td>
												<input type="text" name="cffavorable" readonly="readonly"  value="${examOrder1.cffavorable}" >
											</td>
											<td>
												<input type="text" name="cfarrearage" readonly="readonly"  value="${examOrder1.cfarrearage}" >
											</td>
											<td>
											<c:if test="${examOrder1.cfckbk eq 1}">
												<input type="text" readonly="readonly"  value="初考" >
											</c:if>
											<c:if test="${examOrder1.cfckbk eq 2}">
												<input type="text" readonly="readonly"  value="补考" >
											</c:if>
											<c:if test="${examOrder1.cfckbk eq null}">
												<input type="text" readonly="readonly" value="初考" >
											</c:if>
                                                <input type="hidden" name="cfckbk" value="${examOrder1.cfckbk}">
											</td>
											<td>
												<input type="text" name="cftjr" readonly="readonly"  value="${examOrder1.cftjr}" >
											</td>
											<td>
												<input type="text" name="cfremark" readonly="readonly"  value="${examOrder1.cfremark}" >
												<input type='hidden' name='cfsubscriberesult1' value='${examOrder1.cfsubscriberesult}' >
											</td>
										</tr>
									</c:forEach>
								</table>
						</div>
				</div>

				<div class="fail" style="display: none;" >
						<div style="overflow:auto;height: 240px;width: 79%;padding-left: 20px;padding-top: 20px;">
								<table  width="100%" align="center" class="tableTr" style="min-height:30px;overflow:hidden;border-spacing:0;">
									<tr  class="tr">
										<td  width="20px"></td>
										<td  width="20px"></td>
										<td width="200px" align="center">学员</td>
										<td width="200px" align="center">学员编码</td>
										<td width="200px" align="center">性别</td>
										<td width="200px" align="center">班级</td>
										<td width="200px" align="center">车型</td>
										<td width="200px" align="center">身份证号码</td>
										<td width="200px" align="center">手机</td>
										<td width="200px" align="center">应收金额</td>
										<td width="200px" align="center">已收金额</td>
										<td width="200px" align="center">优惠金额</td>
										<td width="200px" align="center">欠费金额</td>
										<td width="200px" align="center">初考/补考</td>
										<td width="200px" align="center">推荐人</td>
										<td width="200px" align="center">备注</td>
									</tr>
                                    <c:forEach items="${examOrders2}"  var="examOrder1" varStatus="index">
										<input type='hidden' name="fids" class="fid" value="${examOrder1.fid}" >
                                        <tr class="tr_td">
                                            <td>
                                                <input type="checkbox"  name="students">

                                            </td>
											<td>
											<p style="color: black;">${index.index}</p>
											</td>
                                            <td>
                                                <input type="text" readonly="readonly"  name="cfstudentname" value="${examOrder1.cfstudentname}" >
                                                <input type='hidden' name="cfstudentid"  value="${examOrder1.cfstudentid}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfstudentno"  readonly="readonly"  value="${examOrder1.cfstudentno}" >
                                            </td>
                                            <td>
                                                <c:if test="${examOrder1.cfsex eq 1}">
                                                    <input type="text" readonly="readonly"  value="男" >
                                                </c:if>
                                                <c:if test="${examOrder1.cfsex eq 2}">
                                                    <input type="text" readonly="readonly"  value="女" >
                                                </c:if>
                                                <c:if test="${examOrder1.cfsex eq null}">
                                                    <input type="text" readonly="readonly" value="" >
                                                </c:if>
                                                <input type='hidden' name="cfsex1"   value="${examOrder1.cfsex}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfclazzName" readonly="readonly"  value="${examOrder1.cfclazzName}" >
                                                <input type='hidden' name='cfclazzid' value="${examOrder1.cfclazzid}" >
                                            </td>
                                            <td>
                                                <input type="text" readonly="readonly"  value="${examOrder1.cfsqzjcxdh}" >
                                                <input type='hidden' name='cfcarbyte' value="${examOrder1.cfcarbyte}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfidcardno" readonly="readonly"  value="${examOrder1.cfidcardno}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfmobile" readonly="readonly"  value="${examOrder1.cfmobile}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfamount" readonly="readonly"  value="${examOrder1.cfamount}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfreceived" readonly="readonly"  value="${examOrder1.cfreceived}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cffavorable" readonly="readonly"  value="${examOrder1.cffavorable}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfarrearage" readonly="readonly"  value="${examOrder1.cfarrearage}" >
                                            </td>
                                            <td>
                                                <c:if test="${examOrder1.cfckbk eq 1}">
                                                    <input type="text" readonly="readonly"  value="初考" >
                                                </c:if>
                                                <c:if test="${examOrder1.cfckbk eq 2}">
                                                    <input type="text" readonly="readonly"  value="补考" >
                                                </c:if>
                                                <c:if test="${examOrder1.cfckbk eq null}">
                                                    <input type="text" readonly="readonly" value="初考" >
                                                </c:if>
                                                <input type="hidden" name="cfckbk" value="${examOrder1.cfckbk}">
                                            </td>
                                            <td>
                                                <input type="text" name="cftjr" readonly="readonly"  value="${examOrder1.cftjr}" >
                                            </td>
                                            <td>
                                                <input type="text" name="cfremark" readonly="readonly"  value="${examOrder1.cfremark}" >
												<input type='hidden' name='cfsubscriberesult1' value='${examOrder1.cfsubscriberesult}' >
                                            </td>
                                        </tr>
                                    </c:forEach>
								</table>
						</div>

				</div>
				<div class="div_tj" style="padding-top: 0px">
					<div>
						<input class="input_submit bc" onclick="return checkSubmit()" value="" type="submit">
					</div>
					<div>
						<input type="button" class="input_submit fh" value="" />
					</div>
					<input class="state" type="hidden" value="${examOrder.cfbilltype-1}" >
				</div>
			</form>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript" src="<%=path%>/common/stopBrowerBack.js"></script>
<script type="text/javascript">
		$(document).ready(function(){
                var type = "${type}";
                if (type == '0' || type == '' || type == null) {
                } else {
                    alert("添加成功");
//                    editAlert();
                }

			$('.state').val($('.cfbilltype').val()-0-1)
            var fesq=0;
			if($('.tableTr tr').length-1>1){
                fesq=$('.tableTr tr').length-1
			}else{
                fesq=0;
            }
			var User = function(){

			    this.init = function(){

					 $("#uploadEventBtn").live("click",function(){
			             $("#uploadEventFile").click();
			             /*$('.tableTr .tr_td').remove()*/
			         });
			         $("#uploadEventFile").live("change",function(){
			             $("#uploadEventPath").attr("value",$("#uploadEventFile").val());
			             var uploadEventFile = $("#uploadEventFile").val();
                         var pos=uploadEventFile.lastIndexOf("\\");
			           /*  if(confirm("是否把数据导入到考试预约")) {//弹出确认对话框
			            	 if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel
			                     alert("只能上传Excel文件");
			                     return false;
			                 }else{

			                     var url ='<%=path%>/DrivingSys/uploadExamOrderMass';
			                     var formData = new FormData($('form')[1]);
			                     //alert(formData)
			                     user.sendAjaxRequest(url,'POST',formData);
			                 }
			         	   return true;    //点击确定时，返回值为true，执行如上操作。
			         	}else{
			         	   return false; //点击取消时，返回值为false，不执行操作。
			         	}*/
                         $.messager.confirm('提示', '是否把数据导入到考试预约!', function (r) {
                             if (r) {//弹出确认对话框
                                 if(uploadEventFile.lastIndexOf(".xls")<0){//可判断以.xls和.xlsx结尾的excel
                                     alert("只能上传Excel文件");
                                     return false;
                                 }else{
                                     var url ='<%=path%>/DrivingSys/uploadExamOrderMass';
                                     var formData = new FormData($('form')[1]);
									 formData.append('state',$('input[name=cfbilltype]').val())
                                     formData.append('carType',$('input[name=cfsqzjcxdh]').val())
                                     //alert(formData)
                                     user.sendAjaxRequest(url,'POST',formData);
                                     $("#uploadEventFile").val("")
                                     $("#uploadEventPath").removeAttr("value") ;
                                     $(".tablelist11").html('');
                                     $(".resultCount").html('');
                                 }
                                 return true;    //点击确定时，返回值为true，执行如上操作。
                             } else {
                                 $("#uploadEventFile").val("")
                                 $("#uploadEventPath").removeAttr("value") ;
                                 /*return false; //点击取消时，返回值为false，不执行操作。*/
                             }
                         })
			         });

			    }
			    this.sendAjaxRequest = function(url,type,formData){
			        $.ajax({
			            url : url,
			            type : type,
			            data : formData,
                        processData : false,
                        // 告诉jQuery不要去设置Content-Type请求头
                        contentType : false,
			            success : function(res) {

			                if(res != null) {
			                var json = res["student"]
			            	var str=''

								if($(".tr_td").length == 0){
                                    for(var i=0;i<json.length;i++){
                                                fesq++;
                                                str += "<tr align='left' class='tr_td'><td style='width:20px' ><input type='checkbox' name='students' ></td>";
										        str += "<td><p style='color: black;'>"+fesq+"</p></td>"
                                                str += "<td><input type='text' name='cfstudentname' readonly='readonly' style='width:200px'  value="+json[i].fnameL2+"><input type='hidden' name='cfstudentid' value="+json[i].fid+" ></td>"
                                                str += "<td><input type='text'  readonly='readonly' style='width:200px' value="+json[i].fnumber+"  ></td>"
                                                if(json[i].cfsex == 1){
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='男'   ></td>"
                                                    str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                                }else if(json[i].cfsex == 2){
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='女' ></td>"
                                                    str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                                } else{
                                                    str += "<td><input type='text'readonly='readonly' style='width:200px' value='' ></td>"
                                                    str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                                }
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfclazzName+" name='cfclazz' >"
                                                str += "<input type='hidden'readonly='readonly' name='cfclazzid' value="+json[i].cfclazzid+" ></td>"
                                                if(json[i].cfslzjcxdh[0] == 'A' || json[i].cfslzjcxdh[0] == 'B'){
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfslzjcxdh+"  ></td>"
                                                    str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='2' ></td>"
                                                }else{
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfslzjcxdh+"  ></td>"
                                                    str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='1' ></td>"
                                                }
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfidcardno+" name='cfidcardno' ></td>"
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfsjhm+" name='cfmobile' ></td>"
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfamount+" name='cfamount' ></td>"

												if(json[i].cfreceived != null){
													str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfreceived + " name='cfreceived' ></td>"
												}else{
													str += "<td><input type='text' readonly='readonly' style='width:200px' value=" +0+ " name='cfreceived' ></td>"

												}
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cffavorable+" name='cffavorable' ></td>"
                                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfarrearage+" name='cfarrearage' ></td>"
                                                if(json[i].cfckbk == 1){
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考'   ></td>"
                                                    str += "<input type='hidden' name='cfckbk' class='cfckbk' value="+json[i].cfckbk+" >"
                                                    /* $('.ckCount').val($('.ckCount').val()-0+1)*/
                                                }else if(json[i].cfckbk == 2){
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='补考' ></td>"
                                                    str += "<input type='hidden' readonly='readonly' class='cfckbk' name='cfckbk' value="+json[i].cfckbk+" >"
                                                    /*$('.bkCount').val( $('.bkCount').val()-0+1)*/
                                                } else{
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考' ></td>"
                                                    str += "<input type='hidden' name='cfckbk' class='cfckbk' value='1' >"
                                                    /*$('.ckCount').val( $('.ckCount').val()-0+1)*/
                                                }
                                                if(json[i].cftjrName == null) {
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px' value='' name='cftjr' ></td> "
                                                }else{
                                                    str += "<td><input type='text' readonly='readonly' style='width:200px'  name='cftjr' value="+json[i].cftjrName+" ></td> "
                                                }
                                                if(json[i].cfremark == null) {
                                                    str += "<td><input type='text'  style='width:200px' value='' name='cfremark' ></td> </tr>"
                                                }else{
                                                    str += "<td><input type='text'  style='width:200px' name='cfremark' value="+json[i].cfremark+"  ></td> </tr>"
                                                }

                                                if($('.flag').val() == 1){
                                                    str +="<input type='hidden' name='cfsubscriberesult1' value='1' >"
                                                }else{
                                                    str +="<input type='hidden' name='cfsubscriberesult1' value='2' >"
                                                    /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                                                }
                                    }
                                                if($('.flag').val() == 1){
                                                    $('.success').find(".tableTr").append(str)
                                                    /*if($('.yyCount').val() == null ||$('.yyCount').val() == ''){
                                                        $('.yyCount').val(json.length)
                                                    }else{
                                                        $('.yyCount').val((json.length)+($('.yyCount').val()-0))
                                                    }*/
                                                }else{
                                                    $('.fail').find(".tableTr").append(str)
                                                    /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                                                }
                                                var result = res['result']
                                                var data = ''
                                                $('#modal-overlay').css('visibility', 'visible')
                                                $('.modal-data11').css('visibility', 'visible')
                                                sumData ="总共: "+(json.length+result.length)+"条,其中成功的: "+json.length+"条,<font color=\"red\">失败:"+result.length+"条.</font>";
                                                $(".resultCount").append(sumData);
                                                for(var i=0;i<result.length;i++){
                                                    $.ajax({
                                                        url: '<%=path%>/DrivingSys/selectStudentByCerNoAndCompany',
                                                        type: "post",
                                                        data: {'idCerNo': result[i]["idcerNo"]},
                                                        dataType: "json",
														async:false,
                                                        success: function (json) {
															 if(json == null) {
                                                                result[i]["mes"] = "该学员身份证信息有误！！";
															}else if(json.cfslzjcxdh != $('input[name=cfsqzjcxdh]').val()) {
                                                                result[i]["mes"] = "该学员车型错误！！";
                                                            }else {
                                                                result[i]["mes"] = "该学员状态无法进行当前科目预约！！";
															}
                                                        },
                                                        error: function () {}
                                                    })
                                                    data+="<tr><td style='text-align: center;color:red'>失败</td>";
                                                    if(i< result.length){
                                                        data +="<td style='text-align: center'>"+result[i]["name"]+"</td><td style='text-align: center'>"+result[i]["mes"]+"</td></tr>";
                                                    }else{
                                                        data +="<td></td><td></td></tr>";
                                                    }
                                                }
                                                $(".tablelist11").append(data);
                                                $('.flags').val(json.length)

								}else {

			                    var groupIds = [];
                                    $(".tr_td").each(function () {
                                        var gid = $(this).find('td:eq(6) input').val();
										groupIds.push(gid)

                                    })
									var jsonLength = json.length

								for(var i=0;i<json.length;i++){
				            	    var id = json[i].cfidcardno
									if(jQuery.inArray(id, groupIds) > -1){
				            	        json.splice(i,1);
				            	      /*  json.length -= 1
										i = 0*/
									}else {
									    fesq++;
                                        str += "<tr align='left' class='tr_td'><td style='width:20px' ><input type='checkbox' name='students' ></td>";
                                        str += "<td><p style='color: black;'>"+fesq+"</p></td>";
                                        str += "<td><input type='text' name='cfstudentname' readonly='readonly' style='width:200px'  value="+json[i].fnameL2+"><input type='hidden' name='cfstudentid' value="+json[i].fid+" ></td>"
                                        str += "<td><input type='text'  readonly='readonly' style='width:200px' value="+json[i].fnumber+"  ></td>"
                                        if(json[i].cfsex == 1){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='男'   ></td>"
                                            str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                        }else if(json[i].cfsex == 2){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='女' ></td>"
                                            str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                        } else{
                                            str += "<td><input type='text'readonly='readonly' style='width:200px' value='' ></td>"
                                            str += "<input type='hidden' name='cfsex1' value="+json[i].cfsex+" >"
                                        }
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfclazzName+" name='cfclazz' >"
                                        str += "<input type='hidden'readonly='readonly' name='cfclazzid' value="+json[i].cfclazzid+" ></td>"
                                        if(json[i].cfslzjcxdh[0] == 'A' || json[i].cfslzjcxdh[0] == 'B'){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfslzjcxdh+"  ></td>"
                                            str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='2' ></td>"
                                        }else{
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfslzjcxdh+"  ></td>"
                                            str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='1' ></td>"
                                        }
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfidcardno+" name='cfidcardno' ></td>"
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfsjhm+" name='cfmobile' ></td>"
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfamount+" name='cfamount' ></td>"

                                        if(json[i].cfreceived != null){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfreceived + " name='cfreceived' ></td>"
                                        }else{
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" +0+ " name='cfreceived' ></td>"

                                        }
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cffavorable+" name='cffavorable' ></td>"
                                        str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cfarrearage+" name='cfarrearage' ></td>"
                                        if(json[i].cfckbk == 1){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考'   ></td>"
                                            str += "<input type='hidden' name='cfckbk' class='cfckbk' value="+json[i].cfckbk+" >"
                                            /* $('.ckCount').val($('.ckCount').val()-0+1)*/
                                        }else if(json[i].cfckbk == 2){
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='补考' ></td>"
                                            str += "<input type='hidden' readonly='readonly' class='cfckbk' name='cfckbk' value="+json[i].cfckbk+" >"
                                            /*$('.bkCount').val( $('.bkCount').val()-0+1)*/
                                        } else{
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考' ></td>"
                                            str += "<input type='hidden' name='cfckbk' class='cfckbk' value='1' >"
                                            /*$('.ckCount').val( $('.ckCount').val()-0+1)*/
                                        }
                                        if(json[i].cftjrName == null) {
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='' name='cftjr' ></td> "
                                        }else{
                                            str += "<td><input type='text' readonly='readonly' style='width:200px' name='cftjr' value="+json[i].cftjrName+"  ></td> "
                                        }
                                        if(json[i].cfremark == null) {
                                            str += "<td><input type='text'  style='width:200px' value='' name='cfremark' ></td> </tr>"
                                        }else{
                                            str += "<td><input type='text'  style='width:200px' name='cfremark' value="+json[i].cfremark+"  ></td> </tr>"
                                        }

                                        if($('.flag').val() == 1){
                                            str +="<input type='hidden' name='cfsubscriberesult1' value='1' >"
                                        }else{
                                            str +="<input type='hidden' name='cfsubscriberesult1' value='2' >"
                                            /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                                        }
									}

				            	}
                                    if($('.flag').val() == 1){
                                        $('.success').find(".tableTr").append(str)
                                        /*if($('.yyCount').val() == null ||$('.yyCount').val() == ''){
                                            $('.yyCount').val(json.length)
                                        }else{
                                            $('.yyCount').val((json.length)+($('.yyCount').val()-0))
                                        }*/
                                    }else{
                                        $('.fail').find(".tableTr").append(str)
                                        /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                                    }
                                    var result = res['result']
                                    var data = ''
                                    $('#modal-overlay').css('visibility', 'visible')
                                    $('.modal-data11').css('visibility', 'visible')
                                    sumData ="总共: "+(jsonLength+result.length)+"条,其中成功的: "+jsonLength+"条,<font color=\"red\">失败:"+result.length+"条.</font>";
                                    $(".resultCount").append(sumData);
                                    for(var j=0;j<result.length;j++){
                                        $.ajax({
                                            url: '<%=path%>/DrivingSys/selectStudentByCerNoAndCompany',
                                            type: "post",
                                            data: {'idCerNo': result[i]["idcerNo"]},
                                            dataType: "json",
                                            async:false,
                                            success: function (json) {

                                                if(json == null) {
                                                    result[i]["mes"] = "该学员身份证信息有误！！";
                                                }else if(json.cfslzjcxdh != $('input[name=cfsqzjcxdh]').val()) {
                                                    result[i]["mes"] = "该学员车型错误！！";
                                                } else {
                                                    result[i]["mes"] = "该学员状态无法进行当前科目预约！！";
                                                }
                                            },
                                            error: function () {}
                                        })
                                        data+="<tr><td style='text-align: center;color:red'>失败</td>";
                                        if(j< result.length){
                                            data +="<td style='text-align: center'>"+result[j]["name"]+"</td><td style='text-align: center'>"+result[j]["mes"]+"</td></tr>";
                                        }else{
                                            data +="<td></td><td></td></tr>";
                                        }
                                    }
                                    $(".tablelist11").append(data);
                                    $('.flags').val(json.length)

                                }
                            }else {
			                    alert('请检查表格是否正确')
							}
			            },
			            error : function() {
			                alert( "excel上传失败");
			            },
			            cache : false,
			            contentType : false,
			            processData : false
			        });
			    };


					}

			var user;
			$(function(){
			    user = new User();
			    user.init();
			});
		})




		$('#exportExcle').live('click',function(){
			location.href='<%=path%>/DrivingSys/exportExamOrderMassExcle'
		})

		$('.input_submit.fh').click(function(){
            $.messager.confirm('提示', '您进行的数据操作将不会保存!', function (r) {
                if (r) {//弹出确认对话框}
                    //parent.closeSelectCard()
                    location.href = '<%=path%>/DrivingSys/selectExamOrderMass/look.action'
                }

                })
		})

		$('.order').click(function(){
			$('.order').removeClass('active')
			$(this).addClass('active')
			if($(this).html() == '预约成功'){
				$('.success').show()
				$('.fail').hide()
                $('.flag').val("1")
			}else{
				$('.success').hide()
				$('.fail').show()
                $('.flag').val("0")
			}
		})


/*
     	$(".addTable").click(function(){

		}) */



		$('.addTable').live('click',function(){
				$('#modal-overlay').css('visibility','visible')
				$('.modal-data').css('visibility','visible')
				$('input:checkbox').removeAttr('checked');
				$('.flag').val('1')
				$('.page').show()
		})


		$('.failTable').live('click',function(){
			$('#modal-overlay').css('visibility','visible')
			$('.modal-data').css('visibility','visible')
			$('input:checkbox').removeAttr('checked');
			$('.flag').val('2')
			$('.page').show()
		})






		$('.subtn').click(function(){
			  var spCodesTemp = "";
		      $('input:checkbox[name=student]:checked').each(function(i){
		       if(0==i){
		        spCodesTemp = $(this).val();
		       }else{
		        spCodesTemp += (","+$(this).val());
		       }
		      });
            if(spCodesTemp == "null" || spCodesTemp == ""){
                alert("请选择学员")
            }else {

                var fesq=$('.tableTr tr').length-1
                $.ajax({
                    url: '<%=path%>/DrivingSys/selStudentByFid',
                    type: "post",
                    data: {'id': spCodesTemp},
                    dataType: "json",
                    success: function (json) {
                        var json = json.studentsNameList
                        var str = ''
                        for (var i = 0; i < json.length; i++) {
                            str += "<tr align='left' class='tr_td'><td style='width:150px' ><input type='checkbox' name=\"students\" ></td>";
                            str += "<td><p style='color: black;'>"+fesq+"</p></td>"
                            str += "<td><input type='text' name='cfstudentname' readonly='readonly' style='width:200px'  value=" + json[i].fnameL2 + "><input type='hidden' name='cfstudentid' value=" + json[i].fid + " ></td>"
                            str += "<td><input type='text'  readonly='readonly' style='width:200px' value=" + json[i].fnumber + "  ></td>"
                            if (json[i].cfsex == 1) {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='男'   ></td>"
                                str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                            } else if (json[i].cfsex == 2) {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='女' ></td>"
                                str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                            } else {
                                str += "<td><input type='text'readonly='readonly' style='width:200px' value='' ></td>"
                                str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                            }
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfclazzName + " name='cfclazz' >"
                            str += "<input type='hidden'readonly='readonly' name='cfclazzid' value=" + json[i].cfclazzid + " ></td>"
                            if (json[i].cfslzjcxdh[0] == 'A' || json[i].cfslzjcxdh[0] == 'B') {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfslzjcxdh + "  ></td>"
                                str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='2' ></td>"
                            } else {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfslzjcxdh + "  ></td>"
                                str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='1' ></td>"
                            }
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfidcardno + " name='cfidcardno' ></td>"
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfsjhm + " name='cfmobile' ></td>"
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfamount + " name='cfamount' ></td>"
                           if(json[i].cfreceived != null){
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfreceived + " name='cfreceived' ></td>"
                           }else{
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" +0+ " name='cfreceived' ></td>"

						   }
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cffavorable + " name='cffavorable' ></td>"
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfarrearage + " name='cfarrearage' ></td>"
                            if (json[i].cfckbk == 1) {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考'   ></td>"
                                str += "<input type='hidden' name='cfckbk' class='cfckbk' value=" + json[i].cfckbk + " >"
                               /* $('.ckCount').val($('.ckCount').val() - 0 + 1)*/
                            } else if (json[i].cfckbk == 2) {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='补考' ></td>"
                                str += "<input type='hidden' readonly='readonly' class='cfckbk' name='cfckbk' value=" + json[i].cfckbk + " >"
                                /*$('.bkCount').val($('.bkCount').val() - 0 + 1)*/
                            } else {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考' ></td>"
                                str += "<input type='hidden' name='cfckbk' class='cfckbk' value='1' >"
                                /*$('.ckCount').val($('.ckCount').val() - 0 + 1)*/
                            }
                            if(json[i].cftjrName == null) {
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value='' name='cftjr' ></td> "
                            }else{
                                str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cftjrName+" name='cftjr' ></td> "
                            }
                            if (json[i].cfremark == null) {
                                str += "<td><input type='text'  style='width:200px' value='' name='cfremark' ></td></tr> "
                            } else {
                                str += "<td><input type='text'  style='width:200px' value=" + json[i].cfremark + " name='cfremark' ></td></tr> "
                            }

                            if ($('.flag').val() == 1) {
                                str += "<input type='hidden' name='cfsubscriberesult1' value='1' >"
                            } else {
                                str += "<input type='hidden' name='cfsubscriberesult1' value='2' >"
                                /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                            }
                        }

                        if ($('.flag').val() == 1) {
                            $('.success').find(".tableTr").append(str)
                            /*if ($('.yyCount').val() == null || $('.yyCount').val() == '') {
                                $('.yyCount').val(json.length)
                            } else {
                                $('.yyCount').val((json.length) + ($('.yyCount').val() - 0))
                            }*/
                            $('.order').each(function(){
                                if($(this).html() == '预约成功'){
                                    $('.order').removeClass('active')
                                    $(this).addClass('active')
                                }
                            })
                            $('.success').show()
                            $('.fail').hide()
                            $('.flag').val("1")
                        } else {
                            $('.order').each(function(){
                               if($(this).html() == '预约失败'){
                                   $('.order').removeClass('active')
								   $(this).addClass('active')
							   }
							})
                            $('.fail').find(".tableTr").append(str)
                            $('.success').hide()
                            $('.fail').show()
                            $('.flag').val("0")

                            /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                        }
                        $('.flags').val(json.length)
                        $('#modal-overlay').css('visibility', 'hidden')
                        $('.modal-data').css('visibility', 'hidden')
                    },
                    error: function () {
                        alert('Error');
                    }
                });
            }
			})

        /*//防止表单重复提交
        $('form').submit(function() {
            if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
                jQuery.data(this, "disabledOnSubmit", { submited: true });
                $('input[type=submit], input[type=button]', this).each(function() {
                    $(this).attr("disabled", "disabled");
                });
                return true;
            }
            else
            {
                return false;
            }
        });*/

        function checkSubmit(){

            if($('.tableTr tr').length > 2){

            }else {
                alert('请您添加学员')
                return false
            }
            /* 防止表单重复提交 */
            $('form').submit(function() {
                if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
                    jQuery.data(this, "disabledOnSubmit", { submited: true });
                    $('input[type=submit], input[type=button]', this).each(function() {
                        $(this).attr("disabled", "disabled");
                    });

                    return true;
                }
                else
                {

                    return false;
                }
            })

        }
			//取消
			$('.btn').click(function(){
					$('#modal-overlay').css('visibility','hidden')
					//$('.modal-data').css('visibility','hidden')
					$('.modal-data1').css('visibility','hidden')
					$('.modal-data2').css('visibility','hidden')
					$('.modal-data').css('visibility','hidden')
					$('input:checkbox').removeAttr('checked');
				})

        $('.studentData').live('dblclick',function(){
            $(this).find("input:checkbox[name=student]").attr("checked", ":checked")
            var spCodesTemp = "";
            var fesq=$('.tableTr tr').length-1
            $('input:checkbox[name=student]:checked').each(function(i){
                if(0==i){
                    spCodesTemp = $(this).val();
                }else{
                    spCodesTemp += (","+$(this).val());
                }
            });
            $.ajax({
                url: '<%=path%>/DrivingSys/selStudentByFid',
                type: "post",
                data: {'id': spCodesTemp},
                dataType: "json",
                success: function (json) {
                    var json = json.studentsNameList
                    var str = ''
                    for (var i = 0; i < json.length; i++) {
                        str += "<tr align='left' class='tr_td'><td style='width:100px' ><input type='checkbox' name='students' ></td>";
                        str += "<td><p style='color: black;'>"+fesq+"</p></td>"
                        str += "<td><input type='text' name='cfstudentname' readonly='readonly' style='width:200px'  value=" + json[i].fnameL2 + "><input type='hidden' name='cfstudentid' value=" + json[i].fid + " ></td>"
                        str += "<td><input type='text'  readonly='readonly' style='width:200px' value=" + json[i].fnumber + "  ></td>"
                        if (json[i].cfsex == 1) {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='男'   ></td>"
                            str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                        } else if (json[i].cfsex == 2) {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='女' ></td>"
                            str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                        } else {
                            str += "<td><input type='text'readonly='readonly' style='width:200px' value='' ></td>"
                            str += "<input type='hidden' name='cfsex1' value=" + json[i].cfsex + " >"
                        }
                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfclazzName + " name='cfclazz' >"
                        str += "<input type='hidden'readonly='readonly' name='cfclazzid' value=" + json[i].cfclazzid + " ></td>"
                        if (json[i].cfslzjcxdh[0] == 'A' || json[i].cfslzjcxdh[0] == 'B') {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfslzjcxdh + "  ></td>"
                            str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='2' ></td>"
                        } else {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfslzjcxdh + "  ></td>"
                            str += "<input type='hidden' readonly='readonly' name='cfcarbyte' value='1' ></td>"
                        }
                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfidcardno + " name='cfidcardno' ></td>"
                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfsjhm + " name='cfmobile' ></td>"
                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfamount + " name='cfamount' ></td>"

                        if(json[i].cfreceived !== null){
						str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfreceived + " name='cfreceived' ></td>"
						}else{
						str += "<td><input type='text' readonly='readonly' style='width:200px' value="+0+" name='cfreceived' ></td>"
						}

                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cffavorable + " name='cffavorable' ></td>"
                        str += "<td><input type='text' readonly='readonly' style='width:200px' value=" + json[i].cfarrearage + " name='cfarrearage' ></td>"
                        if (json[i].cfckbk == 1) {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考'   ></td>"
                            str += "<input type='hidden' class='cfckbk' name='cfckbk' value=" + json[i].cfckbk + " >"
                            /*$('.ckCount').val($('.ckCount').val() - 0 + 1)*/
                        } else if (json[i].cfckbk == 2) {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='补考' ></td>"
                            str += "<input type='hidden' readonly='readonly' class='cfckbk' name='cfckbk' value=" + json[i].cfckbk + " >"
                            /*$('.bkCount').val($('.bkCount').val() - 0 + 1)*/
                        } else {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='初考' ></td>"
                            str += "<input type='hidden' name='cfckbk' class='cfckbk' value='1' >"
                            /*$('.ckCount').val($('.ckCount').val() - 0 + 1)*/
                        }
                        if(json[i].cftjrName == null) {
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value='' name='cftjr' ></td> "
                        }else{
                            str += "<td><input type='text' readonly='readonly' style='width:200px' value="+json[i].cftjrName+" name='cftjr' ></td> "
                        }
                        if (json[i].cfremark == null) {
                            str += "<td><input type='text'  style='width:200px' value='' name='cfremark' ></td></tr> "
                        } else {
                            str += "<td><input type='text'  style='width:200px' value=" + json[i].cfremark + " name='cfremark' ></td></tr> "
                        }

                        if ($('.flag').val() == 1) {
                            str += "<input type='hidden' name='cfsubscriberesult1' value='1' >"
                        } else {
                            str += "<input type='hidden' name='cfsubscriberesult1' value='2' >"
                            /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                        }
                    }

                    if ($('.flag').val() == 1) {
                        $('.success').find(".tableTr").append(str)
                        /*if ($('.yyCount').val() == null || $('.yyCount').val() == '') {
                            $('.yyCount').val(json.length)
                        } else {
                            $('.yyCount').val((json.length) + ($('.yyCount').val() - 0))
                        }*/
                        $('.order').each(function(){
                            if($(this).html() == '预约成功'){
                                $('.order').removeClass('active')
                                $(this).addClass('active')
                            }
                        })
                        $('.success').show()
                        $('.fail').hide()
                        $('.flag').val("1")
                    } else {
                        $('.order').each(function(){
                            if($(this).html() == '预约失败'){
                                $('.order').removeClass('active')
                                $(this).addClass('active')
                            }
                        })
                        $('.fail').find(".tableTr").append(str)
                        $('.success').hide()
                        $('.fail').show()
                        $('.flag').val("0")

                        /* $('.fail').find(".tableTr td").css('background','#ff7267') */
                    }
                    $('.flags').val(json.length)
                    $('#modal-overlay').css('visibility', 'hidden')
                    $('.modal-data').css('visibility', 'hidden')
                },
                error: function () {
                    alert('Error');
                }
            });


        })
       //单击选中复选框
        $("tr").live('click',function(){
            var check = $(this).find("input[type='checkbox']");
            if(check){
                var flag = check[0].checked;
                if(flag){
                    check[0].checked = false;
                }else{
                    check[0].checked = true;
                }
            }

        });

        //阻止复选框进行冒泡事件
        $("tr input[type='checkbox']").live('click',function(e){
            e.stopPropagation();
        });

        $(".deleteTable ").click(function(){
            var tr_len = $("#table1 tr").length;
            if(tr_len == 1){

            }else{
                $('input:checkbox[name=students]:checked').each(function(i){
                        $(this).parent().parent().remove();
                    /*$(this).parent().parent().remove();*/
                })
            }
        })


</script>
</html>